home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / prog / dasv10_.arj / GETMOUS.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-10  |  346 b   |  22 lines

  1. // mouse.lib function getmouse()
  2. #include <dos.h>
  3.  
  4. void getmouse(int *mx, int *my, int *button){
  5. long far *mvector;
  6. union REGS in, out;
  7.  
  8.     FP_SEG(mvector)=0x0000;
  9.     FP_OFF(mvector)=0x00cc;
  10.  
  11.     if (*mvector){
  12.     in.x.ax=3;
  13.     in.x.bx=in.x.cx=in.x.dx=0;
  14.     int86(0x33, &in, &out);
  15.     *mx=out.x.cx;
  16.     *my=out.x.dx;
  17.     *button=out.x.bx;
  18.     }
  19. }
  20.  
  21.  
  22.